package com.example;

import java.util.Scanner;

/**
 * @author Yancy
 * @program springioctest
 * @create 2020-07-14
 */
public class Demo07 {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    String newStr = "";
    String[] strArray = new String[str.length()];
    for (int i = str.length() - 1; i >= 0; i--) {
      // strArray[str.length() - 1 - i] = str.substring(i, i + 1);
      newStr += str.substring(i, i + 1);
    }
    // System.out.println(Arrays.toString(strArray));
    System.out.println(newStr);
    if (str.equals(newStr)) {
      System.out.println("输入的字符串为回文");
    } else {
      System.out.println("输入的字符串不是回文");
    }
  }
}
